export const a = 1;

// 声明 Blob || File
const obj = new Blob([JSON.stringify({ name: "张三", age: 18, flag: true })], {
  type: "application/json",
});

const data1 = obj.slice(0, 10);
const data2 = obj.slice(10, 20);
const data3 = obj.slice(20, 30);
const data4 = obj.slice(30, 40);

console.log(data1);
console.log(data2);
console.log(data3);
console.log(data4);

console.log(obj);

// 创建文件读取
const fileReader = new FileReader();
// 读取
fileReader.readAsDataURL(obj);

// 监听读取完成
fileReader.addEventListener("load", () => {
	// 获取结果
  console.log(fileReader.result);
});
